<template>
    <div class="all">
        <h4>{{nfoobj.title}}</h4>
        <p class="info">
            <span>{{nfoobj.add_time | dateFormat()}}</span>
            <span>点击量:{{nfoobj.click}}</span>
        </p>
        <hr>
        <div v-html='nfoobj.content'>
        </div>
        <comment-div :uid="id"></comment-div>
        
    </div>
</template>
<script>
import comlist from './conlist/com.vue'
export default {
    data() {
        return {
            id:this.$route.params.id,
            nfoobj:{}
        }
    },
    created() {
        this.getnewfo()
    },
    methods: {
        getnewfo(){
            this.$http.get('api/getnew/'+this.id).then(roulist=>{
                if(roulist.body.status==0){
                    this.nfoobj=roulist.body.message[0]
                }
                 
            })
        }
    },
   components:{
        "comment-div":comlist 
    }
}
</script>
<style lang="scss" scoped>
    h4{
    color: red;
}
.info{
    display:flex;
     justify-content: space-between;
     box-sizing: border-box;
    }

</style>